VERSION=3.0.0-XYZ
HADOOP_SVN_URL=http://svn.apache.org/repos/asf/hadoop/common/trunk
RRD_HADOOP_MAVEN_SVN_URL=https://rrd-hadoop-maven.googlecode.com/svn/repo/

#create working directory

mkdir -p /tmp/rrd-hadoop-maven
cd /tmp/rrd-hadoop-maven
#check out maven and repository
svn co $HADOOP_SVN_URL hadoop
svn co $RRD_HADOOP_MAVEN_SVN_URL repo
cd hadoop
#update revision
mvn versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
#install artifacts
mvn clean install -DcreateChecksum=true -Dmaven.repo.local=/tmp/rrd-hadoop-maven/repo -DskipTests
cd ../repo
#commit repository
svn commit -m "Releasing $VERSION"


